package com.example.mobile20320216061300507;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private TextView textView;
    private TextView textView2;
    private TextView textView3;
    private EditText edUers;
    private EditText edPass;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        textView = (TextView) findViewById(R.id.textView);
        textView2 = (TextView) findViewById(R.id.textView2);
        textView3 = (TextView) findViewById(R.id.textView3);
        edUers = (EditText) findViewById(R.id.ed_uers);
        edPass = (EditText) findViewById(R.id.ed_pass);
        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String toString = edUers.getText().toString().trim();
                String toString2 = edPass.getText().toString().trim();
                Intent intent=new Intent(MainActivity.this,showMainActivity.class);
                intent.putExtra("pass",toString2);
                Bundle bundle=new Bundle();
                bundle.putString("uers",toString);
                intent.putExtras(bundle);
                startActivity(intent);
            }
        });
    }

}